
Title : Appendix B ; The Windows API Structures.
	By : Duncan Bushaw
	Published on : March 22, 2007.

Contents :
	- MENUINFO
	- MENUITEMINFO
	- TPMPARAMS


---------------------------------------------------------------------------------------------------------------------------------------------

MENUINFO.
	This structure holds information about a menu.
LB Syntax :
	STRUCT MENUINFO,_
		cbSize As Ulong,_
		fMask As Ulong,_
		dwStyle As Ulong,_
		cyMax As Ulong,_
		hbrBack As Long,_
		dwContextHelpID As Ulong,_
		dwMenuData As Ulong
Members :
	cbSize [in] ; The size of the structure, in bytes. This must be MENUINFO.cbSize.struct = LEN(MENUINFO.struct). 
	fMask [in] ; The members to set or get. This can be one or more of the following values. 
		MIM_APPLYTOSUBMENUS = 2147483648.  The settings apply to the menu and all of its submenus.
			This is only valid with the SetMenuInfo dll call.
		MIM_BACKGROUND = 2. This sets or gets the hbrBack member.
		MIM_HELPID = 4. This sets or gets the dwContextHelpID member.
		MIM_MAXHEIGHT = 1. This sets or gets the cyMax member.
		MIM_MENUDATA = 8. This sets or gets the dwMenuData member.
		MIM_STYLE = 16. This sets or gets the dwStyle member.
	dwStyle [in/out] ; Style of the menu. This  can be one or more of the following values. 
		MNS_AUTODISMISS = 268435456. Menu automatically ends when mouse is outside the menu for approximately 10 seconds.
		MNS_CHECKORBMP = 67108864. The same space is reserved for the check mark and the bitmap.
			If the menuitem is checked the checkmark is drawn and the bitmap is not.
		MNS_DRAGDROP = 536870912. Menu items are OLE drop targets or drag sources.
			Menu owner receives WM_MENUDRAG and WM_MENUGETOBJECT messages.
		MNS_MODELESS = 1073741824. Menu is modeless; that is, there is no menu modal message loop while the menu is active.
		MNS_NOCHECK = 2147483648. There will be no space reserved to the left of a menuitem for the checkmark.
			The menuitem can still be selected, but the checkmark will not show.
		MNS_NOTIFYBYPOS = 134217728. Menu owner receives a WM_MENUCOMMAND message instead of a WM_COMMAND message
			when the user makes a selection.
	cyMax [in/out] ; Maximum height of the menu in pixels.
		When the menuitems exceed the space available, scroll bars will show. The default (0) is the screen height. 
	hbrBack [in/out] ; Brush to use for the menu's background. 
	dwContextHelpID [in/out] ; The context help identifier. This is the same value used in GetMenuContextHelpId and SetMenuContextHelpId. 
	dwMenuData [in/out] ; An application-defined value. 
Remarks :
This will allow you to do many things to many in the first parameter is set the size of the structure the second parameter must set MIM_STYLE to set the third parameter MIM_APPLYTOSUBMENUS and MIM_MAXHEIGHT seemed to work OK the others have not been tested thoroughly 

---------------------------------------------------------------------------------------------------------------------------------------------

MENUITEMINFO.
	This structure holds information about a menuitem. 
Syntax :
	STRUCT MENUITEMINFO,_
		cbSize As Ulong,_
		fMask As Ulong,_
		fType As Ulong,_
		fState As Ulong,_
		wID As Ulong,_
		hSubMenu As Long,_
		hbmpChecked As Long,_
		hbmpUnchecked As Long,_
		dwItemData As Ulong,_
		dwTypeData$ As Ptr,_
		cch As Ulong,_
		hbmpItem As Long
Members :
	cbSize [in] ; The size of structure, in bytes. This must be MENUITEMINFO.cbSize.struct = LEN(MENUITEMINFO.struct). 
	fMask [in] ; Members to retrieve or set. This can be one or more of these values. [463] and [64 or 128 or 256] or 99,163, or 291
		MIIM_BITMAP = 128. This sets or gets the hbmpItem member. Windows 98/Me, Windows 2000/XP only.
		MIIM_CHECKMARKS = 8. This sets or gets the hbmpChecked and hbmpUnchecked members.
		MIIM_DATA = 32. This sets or gets the dwItemData member.
		MIIM_FTYPE = 256. This sets or gets the fType member. Windows 98/Windows Me, Windows 2000/Windows XP only.
		MIIM_ID = 2. This sets or gets the wID member.
		MIIM_STATE = 1. Retrieves or sets the fState member.
		MIIM_STRING = 64. This sets or gets the dwTypeData member. Windows 98/Windows Me, Windows 2000/Windows XP only.
		MIIM_SUBMENU = 4. This sets or gets the hSubMenu member.
		MIIM_TYPE = 16.  This sets or gets the fType and dwTypeData members.
			Windows 98/Me, Windows 2000/XP: MIIM_TYPE is replaced by MIIM_BITMAP, MIIM_FTYPE, and MIIM_STRING.
	fType [in/out] ; Menu item type. This can be one or more of the following values.
		The MFT_BITMAP, MFT_SEPARATOR, and MFT_STRING values cannot be combined with one another.
		Set fMask to MIIM_TYPE to use fType.Windows 98/Me and Windows 2000/XP, fType is used only if fMask has a value of MIIM_FTYPE. 
		MFT_BITMAP = 4. Displays the menu item using a bitmap. The low-order word of the dwTypeData member is the bitmap handle, and the cch member is ignored.
	Windows 98/Me, Windows 2000/XP: MFT_BITMAP is replaced by MIIM_BITMAP and hbmpItem. 
		MFT_MENUBARBREAK = 32. Places the menuitem on a new line (for a menu bar) or 
			in a new column (for a drop-down menu, submenu, or shortcut menu). 
			For a drop-down menu, submenu, or shortcut menu, a vertical line separates the new column from the old.
		MFT_MENUBREAK = 64. Places the menuitem on a new line (for a menu bar) or 
			in a new column (for a dropdown menu, submenu, or shortcut menu).
			For a drop-down menu, submenu, or shortcut menu, the columns are not separated by a vertical line.
		MFT_OWNERDRAW = 256. Assigns responsibility for drawing the menu item to the window that owns the menu.
			The window receives a WM_MEASUREITEM message before the menu is displayed for the first time, 
			and a WM_DRAWITEM message whenever the appearance of the menu item must be updated. 
			If this value is specified, the dwTypeData member contains an application-defined value.
		MFT_RADIOCHECK = 512. Displays selected menuitems using a radiobutton instead of a checkmark if the hbmpChecked member is NULL.
		MFT_RIGHTJUSTIFY = 16384. Right-justifies the menu item and any subsequent items.
			This value is valid only if the menu item is in a menu bar.
		MFT_RIGHTORDER = 8192. This specifies that menus cascade right-to-left (the default is left-to-right).
			This is used to support right-to-left languages, such as Arabic and Hebrew.
		MFT_SEPARATOR = 2048. Specifies that the menu item is a separator.
			A menuitem separator appears as a horizontal dividing line. The dwTypeData and cch members are ignored.
			This value is valid only in a drop-down menu, submenu, or shortcut menu.
		MFT_STRING = 0. Displays the menu item using a text string.
			The dwTypeData member is the pointer to a null-terminated string, and the cch member is the length of the string.
			Windows 98/Me, Windows 2000/XP: MFT_STRING is replaced by MIIM_STRING.
	fState [in/out] ; Menu item state. This can be one or more of these values.
		MFS_CHECKED = 8. Checks the menu item.
		MFS_DEFAULT = 4096. Specifies that the menu item is the default. A default menuitem is displayed in bold.
		MFS_ENABLED = 0. Enables the menu item so that it can be selected.
		MFS_GRAYED = 1. Disables the menu item and grays it so that it cannot be selected.
		MFS_DISABLED = 2. Disables the menu item and does not gray it so that it cannot be selected.
		MFS_HILITE = 128. Highlights the menu item.
		MFS_UNCHECKED = 0. Unchecks the menu item. For more information about clear menu items, see the hbmpChecked member.
		MFS_UNHILITE = 0. Removes the highlight from the menu item. This is the default state.
	wID [in/out] ; Application-defined 16-bit value that identifies the menu item.
	hSubMenu [in/out] ; The handle to a drop down menu or a submenu associated with the menuitem.
		If the menu item is not an item that opens a drop-down menu or submenu, this member is NULL.
	hbmpChecked [in/out] ; The handle to a bitmap to display next to the item if it is selected. If this is NULL, a default bitmap is used.
		If the MFT_RADIOCHECK type value is specified, the default bitmap is a bullet. Otherwise, it is a checkmark.
	hbmpUnchecked [in/out] ; The handle to a bitmap to display next to the item if it is not selected.
		If this is NULL, no bitmap is used.
	dwItemData [in/out] ; A program defined value associated with the menuitem.
	dwTypeData [in/out] ; The content of the menuitem.
		The meaning of this member depends on the value of fType and is used only if the MIIM_TYPE flag is set in the fMask member. 
		To retrieve a menuitem of type MFT_STRING, first find the size of the string by setting the dwTypeData member of MENUITEMINFO to NULL 
			and then calling GetMenuItemInfo. The value of cch+1 is the size needed. Then allocate a buffer of this size, place the pointer to 
			the buffer in dwTypeData, increment cch, and call GetMenuItemInfo once again to fill the buffer with the string. If the retrieved menuitem 
			is of some other type, then GetMenuItemInfo sets the dwTypeData member to a value whose type is specified by the fType member. 
		When using with the SetMenuItemInfo function, this member should contain a value whose type is specified by the fType member. 
		Windows 98/Me and Windows 2000/XP: dwTypeData is used only if the MIIM_STRING flag is set in the fMask member. 
	cch [in/out] ; The length of the menuitem text, in bytes, when information is received about a menu item of the MFT_STRING type.
		However, cch is used only if the MIIM_TYPE flag is set in the fMask member and is zero otherwise.
		Also, cch is ignored when the content of a menuitem is set by calling SetMenuItemInfo. 
		Note that, before calling GetMenuItemInfo, the application must set cch to the length of the buffer pointed to by the dwTypeData member.
		If the retrieved menuitem is of type MFT_STRING (as indicated by the fType member), then GetMenuItemInfo changes cch to the length 
		of the menuitem text. If the retrieved menuitem is of some other type, GetMenuItemInfo sets the cch field to zero. 
		Windows 98/Me, Windows 2000/XP, The cch member is used when the MIIM_STRING flag is set in the fMask member. 
	hbmpItem [in/out] ; Windows 98/Me, Windows 2000/XP only, The handle to the bitmap to be displayed, or it can be one of the values in the following table.
		HBMMENU_CALLBACK = -1. A bitmap that is drawn by the window that owns the menu.
			The program must process the (WM_MEASUREITEM = 44) and (WM_DRAWITEM = 43) messages.
		HBMMENU_MBAR_CLOSE = 5. Close button for the menu bar.
		HBMMENU_MBAR_CLOSE_D = 6. Disabled close button for the menu bar.
		HBMMENU_MBAR_MINIMIZE = 3. Minimize button for the menu bar.
		HBMMENU_MBAR_MINIMIZE_D = 7. Disabled minimize button for the menu bar.
		HBMMENU_MBAR_RESTORE = 2. Restore button for the menu bar.
		HBMMENU_POPUP_CLOSE = 8. Close button for the submenu.
		HBMMENU_POPUP_MAXIMIZE = 10. Maximize button for the submenu.
		HBMMENU_POPUP_MINIMIZE = 11. Minimize button for the submenu.
		HBMMENU_POPUP_RESTORE = 9. Restore button for the submenu.
		HBMMENU_SYSTEM = 1. Windows icon or the icon of the window specified in dwItemData.
Remarks :
	The MENUITEMINFO structure is used with the GetMenuItemInfo, InsertMenuItem, and SetMenuItemInfo functions.
This Structure is the best way to access menu items and alter the them the first perimeter parameter is set the size and structure and only needs to be dumb ones done wants wants wants to me one in the program settings and her those in Herman the second parameter to foreigners 63 463 was set or get all other parameters 

---------------------------------------------------------------------------------------------------------------------------------------------

TPMPARAMS.
	This structure specifies an area of the screen the menu should not overlap.
LB Syntax :
	STRUCT TPMPARAMS,_
		cbSize As Ulong,_
		rcExclude.Left As Long,_
		rcExclude.Top As Long,_
		rcExclude.Right As Long,_
		rcExclude.Bottom As Long
Members :
	cbSize [in] ; The size of structure, in bytes. This must be TPMPARAMS.cbSize.struct = LEN(TPMPARAMS.struct). 
	rcExclude.Left [in] ; This specifies the left edge of the excluded area of the screen.
	rcExclude.Top [in] ; This specifies the top edge of the excluded area of the screen.
	rcExclude.Right [in] ; This specifies the right edge of the excluded area of the screen.
	rcExclude.Bottom [in] ; This specifies the bottom edge of the excluded area of the screen.
Remarks:

---------------------------------------------------------------------------------------------------------------------------------------------

